package aiku.numericalcontroloa.Model.Entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 采购订单类
 * @TableName purchase_orders
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value ="purchase_orders")
@Data
public class PurchaseOrders extends BaseEntity implements Serializable {

    /**
     * 产品id
     */
    @TableField(value = "products_id")
    private String productsId;

    /**
     * 供应商ID
     */
    @TableField(value = "suppliers_id")
    private String suppliersId;

    /**
     * 订单日期
     */
    @TableField(value = "order_time",fill = FieldFill.INSERT)
    private Date orderTime;

    /**
     * 订单状态（0审核通过,1待审核,2审核不通过）
     */
    @TableField(value = "order_status")
    private String orderStatus;

    /**
     * 数量
     */
    @TableField(value = "number")
    private Float number;

    /**
     * 总金额
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 仓库类型
     */
    @TableField(value = "warehouse_type")
    private String warehouseType;

    /**
     * 采购人id
     */
    @TableField(value = "user_id")
    private String userId;

    /**
     * 库管id
     */
    @TableField(value = "management_id")
    private String managementId;

    /**
     * 结款方式（0现金，1月结）
     */
    @TableField(value = "payment_method")
    private Integer paymentMethod;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


}